import axios from 'axios';
import qs from 'qs';

//权限接口
export function _login(data) {
    return axios.post('/user/login', qs.stringify(data))
}

//获取当前已登陆用户
export function _getLoginUser(data) {
    return axios.get('/user/getLoginUser', {params: data})
}

//获取菜单
export function _loadMenu(data) {
    return axios.get('/menu/loadMenuNewByEmpId', {params: data})
}

//租借用户列表
export function _queryComUserPage(data) {
    return axios.get('/comUser/queryComUserPage', {params: data})
}

//修改租借用户
export function _updateComUserInfo(data) {
    return axios.post('/comUser/updateComUserInfo', data)
}

//删除租借用户
export function _deleteComUserById(data) {
    return axios.get('/comUser/deleteComUserById', {params: data})
}

//后台用户列表
export function _querySysUserPage(data) {
    return axios.get('/sysUser/querySysUserPage', {params: data})
}

//添加后台用户
export function _addSysUser(data) {
    return axios.post('/sysUser/addSysUser', data)
}

//修改后台用户
export function _updateSysUser(data) {
    return axios.post('/sysUser/updateSysUser', data)
}

//删除后台用户
export function _deleteSysUser(data) {
    return axios.get('/sysUser/deleteSysUser', {params: data})
}

//获取权限列表
export function _queryRolePage(data) {
    return axios.get('/role/queryRolePage', {params: data})
}

//添加权限
export function _addRole(data) {
    return axios.post('/role/addRole', data)
}

//修改权限
export function _updateRole(data) {
    return axios.post('/role/updateRoleNew', data)
}

//删除权限
export function _deleteRoleById(data) {
    return axios.get('/role/deleteRoleById', {params: data})
}

//获取权限值下拉
export function _getRolePullDown(data) {
    return axios.get('/role/getRolePullDown', {params: data})
}

//添加图片
export function _uploadPhoto(data) {
    return axios.post('/photo/uploadPhoto', data)
}

//获取产品列表
export function _queryProductInfoPage(data) {
    return axios.post('/productInfo/queryProductInfoPage', data)
}

//获取产品列表
export function _queryProductInfoAllIdNoName(data) {
    return axios.get('/productInfo/queryProductInfoAllIdNoName', {params: data})
}

//添加产品
export function _addProductInfo(data) {
    return axios.post('/productInfo/addProductInfoNewJson', data)
}

//修改产品
export function _updateProductInfo(data) {
    return axios.post('/productInfo/updateProductInfoNewJsonById', data)
}

//产品明细
export function _queryProductInfoDetail(data) {
    return axios.get('/productInfo/queryProductInfoDetail', {params: data})
}

//删除产品
export function _deleteProductInfoById(data) {
    return axios.get('/productInfo/deleteProductInfoNewJsonById', {params: data})
}

//获取订单列表
export function _queryOrdersByStatusPageInfo(data) {
    return axios.post('/order/queryOrdersByStatusPageInfo', data)
}

//增加订单
export function _addOrder(data) {
    return axios.post('/order/addOrder', data)
}

//删除订单
export function _deleteOrderById(data) {
    return axios.post('/order/deleteOrderById', data)
}

//审核订单
export function _updateOrderById(data) {
    return axios.post('/order/updateOrderById', data)
}

//获取画册列表
export function _queryPictureAlbumsByPage(data) {
    return axios.post('/pictureAlbum/queryPictureAlbumsByPage', data)
}

//增加画册
export function _addPictureAlbum(data) {
    return axios.post('/pictureAlbum/addPictureAlbum', data)
}

//删除画册
export function _deletePictureAlbumById(data) {
    return axios.post('/pictureAlbum/deletePictureAlbumById', data)
}

//修改画册
export function _editPictureAlbumById(data) {
    return axios.post('/pictureAlbum/editPictureAlbumById', data)
}